package source;

import source.Entity.EntityType;

/**
 * For each Unit type defined in the enumeration, there will be values assigned.
 * Each value corresponds to an attribute of the Unit. The go in this order:
 * <ol>
 * <li> Offensive Damage
 * <li> Defensive Damage
 * <li> Armor value
 * <li> Max Health/Starting Health
 * <li> Unit Upkeep (??? what value represents this ???)
 * <li> View Distance
 * <li> Movement Rate
 * <li> Manpower required for production
 * <li> Ore required for production
 * <li> <Code>RangedUnit Specific</ Code> Minimum Attack Range
 * <li> <Code>RangedUnit Specific</ Code> Maximum Attack Range
 * <li> Picture (String used to access this UnitType's icon)
 * </ol>
 * <p>
 * This enumeration should assist in creating new units at a later date.
 * For now, it is just a shell.<p>
 * TODO Create enumeration types with values (refer to webpage)
 * 
 * @author Sean Larson
 *
 */
public enum UnitType {
	
		ARMY		(0, 0, 0, 0, 0, 0, 0, 0, 0, "ARMY"),
		COLONIST	(0, 1, 5, 25, 1, 3, 2, 200, 999, "COLONIST"),
		EXPLORER	(0, 1, 2, 15, 1, 2, 4, 50, 999, "EXPLORER"),
		MELEE		(10, 5, 8, 40, 2, 2, 1, 150, 999, "MELEE"),
		RANGED		(5, 3, 5, 30, 2, 4, 2, 150, 999, 2, 8, "RANGED");
		
		private final int oDamage, dDamage, armor, health, upkeep, view, 
							move, manpower, ore, minRange, maxRange;
		private final String picture;
		private final EntityType eType = EntityType.UNIT;
		
		UnitType (int o, int d, int a, int h, int u, int v, int m, int mp, int ore, String picture) {
			this.oDamage = o;
			this.dDamage = d;
			this.armor = a;
			this.health = h;
			this.upkeep = u;
			this.view = v;
			this.move = m;
			this.manpower = mp;
			this.ore = ore;
			this.minRange = 0;
			this.maxRange = 0;
			this.picture=picture;
		}
		
		UnitType (int o, int d, int a, int h, int u, int v, int m, int mp, int ore, int minRange, int maxRange, String picture) {
			this.oDamage = o;
			this.dDamage = d;
			this.armor = a;
			this.health = h;
			this.upkeep = u;
			this.view = v;
			this.move = m;
			this.manpower = mp;
			this.ore = ore;
			this.minRange = minRange;
			this.maxRange = maxRange;
			this.picture=picture;
		}
		
		public int oDamage() 		{ return this.oDamage; 	}
		public int dDamage() 		{ return this.dDamage; 	}
		public int armor()	 		{ return this.armor;	}
		public int health()	 		{ return this.health;	}
		public int upkeep()	 		{ return this.upkeep;	}
		public int view()	 		{ return this.view;		}
		public int move()	 		{ return this.move;		}
		public int manpower()		{ return this.manpower;	}
		public int ore()			{ return this.ore;		}
		public int minRange()		{ return this.minRange;	}
		public int maxRange()		{ return this.maxRange; }
		public String picture()		{ return this.picture;	}
		public EntityType eType()	{ return this.eType;	}
	
}
